import {
    GETHOTDJERList,
    GETHOURDJERList,
    GETNEWDJERList
} from "../constants";


const INITSTATE = {
    hotdjer: [],
    newdjer: [],
    hourdj: []
};
export default function (prestate = INITSTATE, aciton) {
    const {
        type,
        data
    } = aciton;

    let obj = Object.assign({}, prestate);

    switch (type) {
        case GETHOTDJERList:
            obj.hotdjer = data;
            return obj;
            break;
        case GETHOURDJERList:
            obj.hourdj = data;
            return obj;
            break;
        case GETNEWDJERList:
            obj.newdjer = data;
            return obj;
            break;
        default:
            return prestate;
            break;
    }
}